<?php require_once(dirname(__FILE__).'/../func/func_page.php'); ?>
<?php $pi	=	new wwPageItem($_GET['page']); ?>
<wml>
  <card title="<?php echo $pi->blogtitle; ?>">
		<p><a href="./index.php"><?php echo $pi->blogtitle; ?></a></p>
		<p>------------</p>

		<?php if(empty($_GET['p'])): ?>
		<?php foreach($pi->postlist as $key => $value): ?>
		<p><a href="./index.php?p=<?php echo $value->ID; ?>"><?php echo $value->title; ?></a></p>
		<p><small>by <?php echo $pi->getAuthor($value->author); ?> @ <?php echo $value->date; ?></small></p>
		<?php endforeach; ?>
		<p><?php $pi->showAD(); ?></p>
		<p> </p>
		<p><?php $pi->navi($_GET['page']); ?></p>

		<?php else: ?>
			<?php $post	=	$pi->getPost($_GET['p']); ?>
			<p>标题：<?php echo $post->title; ?></p>
			<p>时间：<?php echo $post->date; ?></p>
			<p>分类：<?php echo $pi->getCat($post->ID); ?></p>
			<p>作者：<?php echo $pi->getAuthor($post->author); ?></p>
			<p>============</p>
			<p><?php echo $post->content; ?></p>

			<p><?php $pi->showAD(); ?></p>
		<?php endif; ?>
		<p> </p>
		<p><a href="./index.php">返回首页</a></p>
		<p>------------</p>
		<p>Powered by Wap-WordPress</p>
  </card>
</wml>